package org.jeecg.modules.wms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * 成品库存变动记录表
 */
@Data
@TableName("wms_finished_goods_inventory_log")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "FinishedGoodsInventoryLog", description = "成品库存变动记录")
public class FinishedGoodsInventoryLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;

    /**
     * 库存记录ID
     */
    @Excel(name = "库存记录ID", width = 15)
    @ApiModelProperty(value = "库存记录ID")
    private String inventoryId;

    /**
     * 销售订单号
     */
    @Excel(name = "销售订单号", width = 15)
    @ApiModelProperty(value = "销售订单号")
    private String orderNo;

    /**
     * 操作类型：1-入库，2-出库，3-调整，4-预留，5-释放
     */
    @Excel(name = "操作类型", width = 15, dicCode = "finished_goods_operation_type")
    @Dict(dicCode = "finished_goods_operation_type")
    @ApiModelProperty(value = "操作类型：1-入库，2-出库，3-调整，4-预留，5-释放")
    private Integer operationType;

    /**
     * 操作数量
     */
    @Excel(name = "操作数量", width = 15)
    @ApiModelProperty(value = "操作数量")
    private Integer operationQuantity;

    /**
     * 操作前数量
     */
    @Excel(name = "操作前数量", width = 15)
    @ApiModelProperty(value = "操作前数量")
    private Integer beforeQuantity;

    /**
     * 操作后数量
     */
    @Excel(name = "操作后数量", width = 15)
    @ApiModelProperty(value = "操作后数量")
    private Integer afterQuantity;

    /**
     * 操作原因
     */
    @Excel(name = "操作原因", width = 20)
    @ApiModelProperty(value = "操作原因")
    private String operationReason;

    /**
     * 关联单据号
     */
    @Excel(name = "关联单据号", width = 15)
    @ApiModelProperty(value = "关联单据号")
    private String relatedDocNo;

    /**
     * 操作员ID
     */
    @ApiModelProperty(value = "操作员ID")
    private String operatorId;

    /**
     * 操作员姓名
     */
    @Excel(name = "操作员", width = 15)
    @ApiModelProperty(value = "操作员姓名")
    private String operatorName;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;

    /**
     * 创建时间
     */
    @Excel(name = "操作时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
